import React from 'react'
import { Row, Col } from 'antd'
import { history } from 'umi'
import styles from './index.less'
export default () => {

    const pieceList = [
        {
            url: "http://uniapp.niuteam.cn/addons/NsGoods/ico.png",
            title: "普通商品",
            desc: "（提供店铺线上服务商品的交易）"
        },
        {
            url: "http://uniapp.niuteam.cn/addons/NsCardGoods/ico.png",
            title: "卡券商品",
            desc: "（支持卡券类的账户秘钥销售））"
        },
        {
            url: "http://uniapp.niuteam.cn/addons/NsWebGoods/ico.png",
            title: "网盘商品",
            desc: "（提供网络虚拟化产品的购买交易）"
        },
        {
            title: "虚拟商品",
            desc: "（虚拟商品支持核销管理）",
            url: "http://uniapp.niuteam.cn/addons/NsVirtualGoods/ico.png"
        },
        {
            url: "http://uniapp.niuteam.cn/addons/NsDownloadGoods/ico.png",
            title: "下载商品",
            desc: "（下载商品支持网上下载）"
        }
    ];

    return (
        <>
            <h2 style={{ fontWeight: 100, textAlign: "center" }}>选择上货方式</h2>
            <Row>
                {
                    pieceList.map((item, inx) => {
                        return (
                            <Col span={8} key={inx} style={{ paddingBottom: "20px" }}>
                                <div style={{ border: "1px solid #e6e9f0", margin: "10px", padding: "12px" }} className={styles.piece} onClick={() => {
                                    history.push("/goods/list-save", {
                                        page: 2
                                    })
                                }}>
                                    <img src={item.url} alt="" style={{ float: "left", width: "50px", marginRight: "10px" }} />
                                    <div style={{ float: "left", width: "50%" }}>
                                        <span style={{ color: "rgba(0, 0, 0, 0.6)" }}>{item.title}</span>
                                        <div style={{ color: "#999", fontSize: "12px" }}>{item.desc}</div>
                                    </div>
                                    <div style={{ clear: "both" }} />
                                </div>
                            </Col>
                        )
                    })
                }
            </Row>
        </>
    )
}